@echo off
echo Creating install package '%2'

cscript /nologo %BuildRoot%\tools\setup\createlicense.vbs
call %BuildRoot%\tools\setup\expandenv %1 > %1.tmp
cscript /nologo %BuildRoot%\public\ext\wix1\wix\candle.wsf %WIXCFLAGS% -c %1.wixobj %1.tmp
cscript /nologo %BuildRoot%\public\ext\wix1\wix\light.wsf %WIXLFLAGS% -o %2 %1.wixobj

if exist Error.%LOCTARGET% (
   echo Creating localized messages %LOCTARGET%
   copy Error.%LOCTARGET% Error.idt
   copy ActionTe.%LOCTARGET% ActionTe.idt
   %BuildRoot%\tools\x86\msidb -d %2 -f %cd% -i ActionText Error
)
